
/****
 * Copyright (C) 2006 dNux team
 *                                                            ****
 * This program is free software; you can redistribute it and/or *
 * modify under the terms of the GNU General Public License as   *
 * published by the Free Software Foundation;                    *
 * either version 2 of the License.                              *
 *                                                               *
 * This program is distributed in the hope that it will be       *
 * useful, but WITHOUT ANY WARRANTY; without even the implied    *
 * warranty of without even the implied waranty of               *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.          *
 * See the GNU General Public License for more details.          *
 *                                                               *
 * You should have received a copy of the                        *
 * GNU General Public License                                    *
 * along with this program; if not, write to the                 *
 * Free Software Foundation, Inc.,                               *
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. *
 *                                                               *
 ****                                                         ****/

#ifndef __DPKG_H__
#define __DPKG_H__

#define LIBDPKG "libdpkg"

#include <dcore.h>

#include <bzlib.h>
#include <libtar.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <dirent.h>

#include <dpkg/typedef.h>
#include <dpkg/create.h>
#include <dpkg/install.h>

struct _d_pkg_s {
  char *file;
  char *name;
  char *version;
  char *install_prefix;
};

d_pkg_t *d_pkg_new();
void     d_pkg_free(d_pkg_t **pkg);

void     d_pkg_set_install_prefix(d_pkg_t *pkg, char *prefix);
void     d_pkg_set_file(d_pkg_t *pkg, char *file);
void     d_pkg_set_name(d_pkg_t *pkg, char *name);
void     d_pkg_set_version(d_pkg_t *pkg, char *version);

#endif /* __DPKG_H__ */
